package com.roncoo.order.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.roncoo.order.dao.EduCourseDao;
import com.roncoo.order.entity.EduCourse;
import com.roncoo.order.service.EduCourseService;
import org.springframework.stereotype.Service;

/**
 * (EduCourse)表服务实现类
 *
 * @author makejava
 * @since 2021-03-26 09:24:48
 */
@Service("eduCourseService")
public class EduCourseServiceImpl extends ServiceImpl<EduCourseDao, EduCourse> implements EduCourseService {

    /*
    查询课程
     */
    @Override
    public EduCourse getData(EduCourse eduCourse) {
        QueryWrapper<EduCourse> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("lecturer_id",eduCourse.getLecturerId());
        queryWrapper.eq("title",eduCourse.getTitle());
        System.out.println(this.getOne(queryWrapper));
        return this.getOne(queryWrapper);
    }
}
